﻿using System;
using System.Windows.Automation;

namespace RobotUI.Controls
{
	/// <summary>
	/// Button control
	/// </summary>
	public class Button : Control
	{
		public Button(AutomationElement element) : base(element) { }
		
		public override void SetValue(string data)
		{
			throw new NotImplementedException("SteValue not supported for Button control");
		}
		
		public override string GetValue()
		{
			throw new NotImplementedException("SteValue not supported for Button control");
		}

		public override void Click()
		{
			var invpat = _element.GetCurrentPattern(InvokePattern.Pattern) as InvokePattern;
        	invpat.Invoke();
		}
		
		
	}
}
